/*
	Copyright (C) 2009 Salil Bhagurkar
	
	This file is part of ViSE
	
	ViSE is free software: you can redistribute it and/or modify
	it under the terms of the GNU Lesser General Public License as published by
	the Free Software Foundation, either version 3 of the License, or
	(at your option) any later version.
	
	ViSE is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU Lesser General Public License for more details.
	
	You should have received a copy of the GNU Lesser General Public License
	along with ViSE.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <shared.h>

/*Classifier for devices*/



struct node_fs class_fs = {
	.type = TYPE_FS_SERVER,
	NODE_FS_INIT_INIT,
	.name = "class",
	NODE_FS_OPS_INIT,
	NODE_FS_INIT_VARS,
	NODE_FS_LIST_INIT
};


static struct node_fs console_class = {
	.type = TYPE_FS_BOTH,
	.name = "console",
	NODE_FS_INIT_VARS,
	NODE_FS_INIT_INIT,
	NODE_FS_OPS_INIT,
	NODE_FS_LIST_INIT,
};

static struct node_fs storage_class = {
	.type = TYPE_FS_BOTH,
	.name = "storage",
	NODE_FS_INIT_VARS,
	NODE_FS_INIT_INIT,
	NODE_FS_OPS_INIT,
	NODE_FS_LIST_INIT,
};


static struct node_fs power_class = {
	.type = TYPE_FS_BOTH,
	.name = "power",
	NODE_FS_INIT_VARS,
	NODE_FS_INIT_INIT,
	NODE_FS_OPS_INIT,
	NODE_FS_LIST_INIT,
};



/*Perform class initiation which creates directories in the fs*/
void init_class()
{
	fs_link("/", &class_fs);
	fs_link("/class", &console_class);
	fs_link("/class", &storage_class);
	fs_link("/class", &power_class);
	register_graphics(); //This does more than above stupid classes
}
